<h1>Listing messages</h1>

<table>
  <tr>
    <th>Id</th>
    <th>Content</th>
    <th>Userid</th>
    <th>Timestamp</th>
    <th>Pic source url</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @messages.each do |message| %>
  <tr>
    <td><%= message.id %></td>
    <td><%= message.content %></td>
    <td><%= message.userid %></td>
    <td><%= message.timestamp %></td>
    <td><%= message.pic_source_url %></td>
    <td><%= link_to 'Show', message %></td>
    <td><%= link_to 'Edit', edit_message_path(message) %></td>
    <td><%= link_to 'Destroy', message, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Message', new_message_path %>
